package org.jeecg.modules.online.auth.service.p005a;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.lang.invoke.SerializedLambda;
import java.util.ArrayList;
import java.util.List;
import org.jeecg.modules.online.auth.entity.OnlAuthRelation;
import org.jeecg.modules.online.auth.mapper.OnlAuthRelationMapper;
import org.jeecg.modules.online.auth.service.IOnlAuthRelationService;
import org.springframework.stereotype.Service;

@Service("onlAuthRelationServiceImpl")
/* renamed from: org.jeecg.modules.online.auth.service.a.c */
/* loaded from: hibernate-re-3.7.1-RC.jar:org/jeecg/modules/online/auth/service/a/c.class */
public class OnlAuthRelationServiceImpl extends ServiceImpl<OnlAuthRelationMapper, OnlAuthRelation> implements IOnlAuthRelationService {
    @Override // org.jeecg.modules.online.auth.service.IOnlAuthRelationService
    public void saveRoleAuth(String roleId, String cgformId, int type, String authMode, List<String> authIds) {
    	LambdaQueryWrapper query = new LambdaQueryWrapper<OnlAuthRelation>()
       		 .eq(OnlAuthRelation::getCgformId, cgformId).eq(OnlAuthRelation::getType, type).eq(OnlAuthRelation::getAuthMode, authMode).eq(OnlAuthRelation::getRoleId, roleId);
         this.baseMapper.delete(query);
        ArrayList arrayList = new ArrayList();
        for (String str : authIds) {
            OnlAuthRelation onlAuthRelation = new OnlAuthRelation();
            onlAuthRelation.setAuthId(str);
            onlAuthRelation.setCgformId(cgformId);
            onlAuthRelation.setRoleId(roleId);
            onlAuthRelation.setType(Integer.valueOf(type));
            onlAuthRelation.setAuthMode(authMode);
            arrayList.add(onlAuthRelation);
        }
        saveBatch(arrayList);
    }
}
